package com.xuhuan.practice.dto.common;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xuhuan.practice.validator.group.UpdateGroup;
import jakarta.validation.constraints.NotNull;
import java.time.LocalDateTime;
import lombok.Data;

/**
 * @author: huan.xu
 * @create: 2024/6/13 18:00
 * @description: 通用DTO属性
 **/
@Data
public class BaseDTO {

  @NotNull(groups = UpdateGroup.class)
  private Integer id;

  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private LocalDateTime createTime;

  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
  private LocalDateTime updateTime;

}
